<%@ page import="com.esurvey.core.*" %>
<HTML>
    <HEAD>
    </HEAD>
    <BODY>
        <%
            String login = request.getParameter("login");
			try {
				String secretQuestion = eSurveyPersistence.rescureSecretQuestion(login);

				if (secretQuestion != "") {
					session.setAttribute("login", login);
					session.setAttribute("secretQuestion", secretQuestion);
					response.sendRedirect("rescurePasswordAction.jsp");
				} else {
					response.sendRedirect("rescurePassword.jsp?userExists=false");
				}
			} catch (Exception e) {
				response.sendRedirect("error.jsp?exception="+e);
			}
        %>
    </BODY>
</HTML>
